#comments-start - More Info Dialog
[SCRIPT NAME]Send Keys
Description:
    - Sends keystrokes to the top most window.
        - Notes:
            - Refer to the AutoIt Help files (Function Send) for additional details and syntax help.
            - All double quotes and single quotes are treated as literal so specifying ''"'""car\" will output ''"'""car\".
Arguments:
    - Arg1: The keys to send to the top most window (Required)
        - Examples:
            - Hello World!
            - "{TAB}{TAB}"  ; Presses TAB twice
            - {TAB}{TAB}Hello {TAB}World!
            - {SPACE}  ; Presses space bar 1 time
            - {DEL 4}  ; Presses the DEL key 4 times
            - {S 30}   ; Sends 30 'S' characters
            - {TAB 4}  ; Presses SHIFT+TAB 4 times
            - {a down} ; Holds the A key down
            - {a up}  ; Releases the A key
	- Arg2: Flag to change how keys are processed
        - Options:
            - 0 = Text contains special characters like + and ! to indicate SHIFT and ALT key-presses. (Default)
            - 1 = Keys are sent raw.
#comments-end - More Info Dialog
#include <Include\WinClickPro.au3>

Func Main()
	Local $sKeyString = ""
	Local $sFlag = 0 ; Default

	;
	; This script has 1 required argument
	;
	If $CmdLine[0]  < 1 Then
		_DisplayErrorAndExit("Invalid argument count detected!" & @LF & "Count: " & $CmdLine[0])
	EndIf

	$sKeyString = _TokenConverter($CmdLine[1])

	If $CmdLine[0] > 1 Then
		$sFlag = $CmdLine[2]
		If $sFlag == "" Then
			$sFlag = 1 ; Restore to default since user passed in an empty string
		EndIf
	EndIf

	Send($sKeyString, $sFlag)
EndFunc

Main()
Exit @error